﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Administrador/Site.Master" AutoEventWireup="true" CodeBehind="ModificarUsuarioAdmin.aspx.cs" Inherits="Smart_House_System.Administrador.Formulario_web1" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2 id="myH2" style="margin-top:10%;">
        Modificar Usuario
    </h2>
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
    <div class="accordionHeader">Modificar Usuario</div>
        <asp:Panel ID="AccordionPane2" runat="server" CssClass="accordionContent">   
        <table style="width: 100%;"  >
            <tr><td>&nbsp;</td></tr>
            <tr >
                <td style="text-align:right; width:45%">
                    &nbsp;
                    Cedula</td>
                <td style="text-align:left; width:55%">
                    <asp:TextBox ID="txtCedula" runat="server" CssClass="myText" MaxLength="8"></asp:TextBox>
                    &nbsp;  
                    <asp:Button ID="btnBuscar" runat="server" Text=""  CssClass="btnBuscarUsu" onclick="btnBuscar_Click"/>
                    &nbsp;      
                    <asp:RequiredFieldValidator ID="rfvCedula" runat="server" 
                        ControlToValidate="txtCedula" ErrorMessage="*Cedula - Campo obligatorio" ForeColor="Red" Display="None"></asp:RequiredFieldValidator>
                     &nbsp;  
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"  ControlToValidate="txtCedula" ValidationExpression="([Z0-9]{8,30})$" 
                        ErrorMessage="El campo debe contener 8 números"  ForeColor="Red"></asp:RegularExpressionValidator>

                </td>
            </tr>
            <tr >
                <td style="text-align:right; width:45%">
                    &nbsp;
                    Usuario</td>
                <td style="text-align:left; width:55%">
                    <asp:TextBox ID="txtUsuario" runat="server" CssClass="myText" Enabled="false"></asp:TextBox>
                    &nbsp;      
                    <asp:RegularExpressionValidator ID="revUsuario" runat="server"
                       ErrorMessage="**Usuario - Minimo 8 caracteres."
                       ControlToValidate="txtUsuario" ForeColor="Red"
                       ValidationExpression="([a-zA-Z0-9]{8,30})$" Display="None" Enabled="false" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="txtUsuario" ErrorMessage="*Usuario - Campo obligatorio" ForeColor="Red" Display="None" Enabled="false"></asp:RequiredFieldValidator>
    <%--                <asp:RequiredFieldValidator ID="rfvUsuario" runat="server" 
                        ControlToValidate="txtUsuario" ErrorMessage="*Campo obligatorio" ForeColor="Red"></asp:RequiredFieldValidator>--%>
                </td>
            </tr>
            <tr >
                <td style="text-align:right; width:45%">
                    &nbsp;
                    Contraseña</td>
                <td style="text-align:left; width:55%">
                    <asp:TextBox ID="txtPassword" runat="server" CssClass="myText" TextMode="Password" Enabled="false"></asp:TextBox>
                    &nbsp;<asp:CheckBox ID="chkPass" runat="server" 
                        oncheckedchanged="chkPass_CheckedChanged" Text="Cambiar contraseña?" AutoPostBack="true"/>
                    <asp:RegularExpressionValidator ID="regexpName" runat="server"
                       ErrorMessage="*Contraseña - Ingresar entre 8 y 20 caracteres, conteniendo al menos un numero y un caracter, no acepta caracteres especiales"
                       ControlToValidate="txtPassword" ForeColor="Red" Display="None"
                       ValidationExpression="(?!^[0-9]*$)(?!^[a-zA-Z]*$)^([a-zA-Z0-9]{8,20})$" Enabled="false" />
                    <asp:RequiredFieldValidator ID="rfvPass" runat="server" 
                        ControlToValidate="txtPassword" ErrorMessage="*Contraseña - Campo obligatorio" ForeColor="Red" Display="None" Enabled="false"></asp:RequiredFieldValidator>


                </td>
            </tr>
            <tr >
                <td style="text-align:right; width:45%">
                    &nbsp;
                    Rol</td>
                <td style="text-align:left; width:55%">
                    <div >
                       <select id="comboRol" class="styled-select" runat="server">
                          <option>Habitante Principal</option>
                          <option>Habitante Secundario</option>
                          <option>Habitante Terciario</option>
                       </select>
                    </div>
                </td>
            </tr>
            <tr><td>&nbsp;</td></tr>
        </table>
        </asp:Panel>

        <script type="text/javascript">

        </script>

        <div style="width=100%; text-align:center;" >
            <asp:ValidationSummary ID="ValidationSummary1" runat="server"  />
        <div style="width=100%; text-align:center;" >
            <asp:Label ID="lblMensaje" runat="server" Text="" Font-Size="Larger" ForeColor="Red"></asp:Label>
        </div>
        <asp:Button ID="btnSiguiente" runat="server" Text="Aceptar"  
            CssClass="myButton" onclick="btnSiguiente_Click"/>  &nbsp;  &nbsp;
        <asp:Button ID="btnCancelar" runat="server" Text="Cancelar" CssClass="myButton" 
            onclick="btnCancelar_Click" CausesValidation="False" />
    </div>

</asp:Content>
